import React from 'react';

var instance  = null;

export class PanResponderHelper {
  constructor() {
    if(!instance) {
      instance = this;

      this.target = null;
    }
    return instance;
  }

  register(object) {
    if(this.target) {
      return false;
    }
    this.target = object;
    return true;
  }

  unregister(object) {
    if(this.target == object) {
      this.target = null;
    }
  }
}

new PanResponderHelper();
module.exports = instance;
